<template>
  <a-layout id="components-layout-demo-top-side-2">
    <a-layout-header class="header" style="-webkit-app-region:drag">
      <div class="logo"> <img src="../assets/logo1.png" height="64px"/></div>
      <div class="myinfo">
        <a-avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
        <span style="color: aliceblue">老野，欢迎你</span>

      </div>
    </a-layout-header>
    <a-layout>
      <a-layout-sider width="200" style="background: #fff">
        <a-menu
                mode="vertical"
                :default-selected-keys="['1']"
                :default-open-keys="['menu1']"
                :style="{ height: '100%', borderRight: 0 }"
        >
          <a-menu-item  @click="goHome('/Home')">
            <a-icon type="user"/>
            <span>主页</span>
          </a-menu-item>
          <a-menu-item @click="goHome('/myTrain')">
            <a-icon type="laptop" />我的培训
          </a-menu-item>
          <a-menu-item @click="goHome('/record')">
            <a-icon type="upload" />录制上传
          </a-menu-item>
        </a-menu>
      </a-layout-sider>
      <a-layout style="padding: 0 24px 24px">
        <a-breadcrumb style="margin: 8px 0">
        </a-breadcrumb>
        <a-layout-content
                :style="{ background: '', padding: '8px', margin: 0, minHeight: '380px', height: '100%'}"
        >
          <router-view> </router-view>
        </a-layout-content>
      </a-layout>
    </a-layout>
  </a-layout>
</template>
<script>
  export default {
    methods: {
      goHome (path) {
        this.$router.push(path)
      },
      data () {
        return {
          collapsed: false
        }
      }
    }
  }
</script>

<style>
  #components-layout-demo-top-side-2 .logo {
    width: 120px;
    height: 31px;
    /*background: rgba(255, 255, 255, 0.2);*/
    /*margin: 16px 28px 16px 0;*/
    float: left;
  }
  #components-layout-demo-top-side-2 .myinfo {
    float: right;
  }
  button,img{
    -webkit-app-region:no-drag
  }
</style>


